/******************************************************************************
 * Product: Adempiere ERP & CRM Smart Business Solution                       *
 * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved.                *
 * This program is free software, you can redistribute it and/or modify it    *
 * under the terms version 2 of the GNU General Public License as published   *
 * by the Free Software Foundation. This program is distributed in the hope   *
 * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.           *
 * See the GNU General Public License for more details.                       *
 * You should have received a copy of the GNU General Public License along    *
 * with this program, if not, write to the Free Software Foundation, Inc.,    *
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.                     *
 * For the text or an alternative of this public license, you may reach us    *
 * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA        *
 * or via info@compiere.org or http://www.compiere.org/license.html           *
 *****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;

import java.math.BigDecimal;
import java.sql.ResultSet;
import java.util.Properties;
import org.compiere.util.Env;

/** Generated Model for hrm_vacationline
 *  @author Adempiere (generated) 
 *  @version Release 3.7.0LTS - $Id$ */
public class X_hrm_vacationline extends PO implements I_hrm_vacationline, I_Persistent 
{

	/**
	 *
	 */
	private static final long serialVersionUID = 20130627L;

    /** the default Constructor */
    public X_hrm_vacationline(Properties ctx)
    { 
      super (ctx, null, null);
    } 

    /** Standard Constructor */
    public X_hrm_vacationline (Properties ctx, int hrm_vacationline_ID, String trxName)
    {
      super (ctx, hrm_vacationline_ID, trxName);
      /** if (hrm_vacationline_ID == 0)
        {
			sethrm_amount (Env.ZERO);
// 0
			sethrm_vacation_ID (0);
			sethrm_vacation_line_ID (0);
			sethrm_vacationline_ID (0);
        } */
    }

    /** Load Constructor */
    public X_hrm_vacationline (Properties ctx, ResultSet rs, String trxName)
    {
      super (ctx, rs, trxName);
    }

    /** AccessLevel
      * @return 3 - Client - Org 
      */
    protected int get_AccessLevel()
    {
      return accessLevel.intValue();
    }

    /** Load Meta Data */
    protected POInfo initPO (Properties ctx)
    {
      POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
      return poi;
    }

    public String toString()
    {
      StringBuffer sb = new StringBuffer ("X_hrm_vacationline[")
        .append(get_ID()).append("]");
      return sb.toString();
    }

	public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException
    {
		return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name)
			.getPO(getC_BPartner_ID(), get_TrxName());	}

	/** Set Business Partner .
		@param C_BPartner_ID 
		Identifies a Business Partner
	  */
	public void setC_BPartner_ID (int C_BPartner_ID)
	{
		if (C_BPartner_ID < 1) 
			set_Value (COLUMNNAME_C_BPartner_ID, null);
		else 
			set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID));
	}

	/** Get Business Partner .
		@return Identifies a Business Partner
	  */
	public int getC_BPartner_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public org.compiere.model.I_C_Charge getC_Charge() throws RuntimeException
    {
		return (org.compiere.model.I_C_Charge)MTable.get(getCtx(), org.compiere.model.I_C_Charge.Table_Name)
			.getPO(getC_Charge_ID(), get_TrxName());	}

	/** Set Charge.
		@param C_Charge_ID 
		Additional document charges
	  */
	public void setC_Charge_ID (int C_Charge_ID)
	{
		if (C_Charge_ID < 1) 
			set_Value (COLUMNNAME_C_Charge_ID, null);
		else 
			set_Value (COLUMNNAME_C_Charge_ID, Integer.valueOf(C_Charge_ID));
	}

	/** Get Charge.
		@return Additional document charges
	  */
	public int getC_Charge_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_C_Charge_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set hrm_amount.
		@param hrm_amount hrm_amount	  */
	public void sethrm_amount (BigDecimal hrm_amount)
	{
		set_Value (COLUMNNAME_hrm_amount, hrm_amount);
	}

	/** Get hrm_amount.
		@return hrm_amount	  */
	public BigDecimal gethrm_amount () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_hrm_amount);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	public I_hrm_reserve gethrm_reserve() throws RuntimeException
    {
		return (I_hrm_reserve)MTable.get(getCtx(), I_hrm_reserve.Table_Name)
			.getPO(gethrm_reserve_ID(), get_TrxName());	}

	/** Set hrm_reserve.
		@param hrm_reserve_ID hrm_reserve	  */
	public void sethrm_reserve_ID (int hrm_reserve_ID)
	{
		if (hrm_reserve_ID < 1) 
			set_Value (COLUMNNAME_hrm_reserve_ID, null);
		else 
			set_Value (COLUMNNAME_hrm_reserve_ID, Integer.valueOf(hrm_reserve_ID));
	}

	/** Get hrm_reserve.
		@return hrm_reserve	  */
	public int gethrm_reserve_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_reserve_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public I_hrm_reservesectional gethrm_reservesectional() throws RuntimeException
    {
		return (I_hrm_reservesectional)MTable.get(getCtx(), I_hrm_reservesectional.Table_Name)
			.getPO(gethrm_reservesectional_ID(), get_TrxName());	}

	/** Set hrm_reservesectional.
		@param hrm_reservesectional_ID hrm_reservesectional	  */
	public void sethrm_reservesectional_ID (int hrm_reservesectional_ID)
	{
		if (hrm_reservesectional_ID < 1) 
			set_Value (COLUMNNAME_hrm_reservesectional_ID, null);
		else 
			set_Value (COLUMNNAME_hrm_reservesectional_ID, Integer.valueOf(hrm_reservesectional_ID));
	}

	/** Get hrm_reservesectional.
		@return hrm_reservesectional	  */
	public int gethrm_reservesectional_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_reservesectional_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public I_hrm_vacation gethrm_vacation() throws RuntimeException
    {
		return (I_hrm_vacation)MTable.get(getCtx(), I_hrm_vacation.Table_Name)
			.getPO(gethrm_vacation_ID(), get_TrxName());	}

	/** Set hrm_vacation.
		@param hrm_vacation_ID hrm_vacation	  */
	public void sethrm_vacation_ID (int hrm_vacation_ID)
	{
		if (hrm_vacation_ID < 1) 
			set_Value (COLUMNNAME_hrm_vacation_ID, null);
		else 
			set_Value (COLUMNNAME_hrm_vacation_ID, Integer.valueOf(hrm_vacation_ID));
	}

	/** Get hrm_vacation.
		@return hrm_vacation	  */
	public int gethrm_vacation_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_vacation_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public I_hrm_vacation_line gethrm_vacation_line() throws RuntimeException
    {
		return (I_hrm_vacation_line)MTable.get(getCtx(), I_hrm_vacation_line.Table_Name)
			.getPO(gethrm_vacation_line_ID(), get_TrxName());	}

	/** Set hrm_vacation_line.
		@param hrm_vacation_line_ID hrm_vacation_line	  */
	public void sethrm_vacation_line_ID (int hrm_vacation_line_ID)
	{
		if (hrm_vacation_line_ID < 1) 
			set_Value (COLUMNNAME_hrm_vacation_line_ID, null);
		else 
			set_Value (COLUMNNAME_hrm_vacation_line_ID, Integer.valueOf(hrm_vacation_line_ID));
	}

	/** Get hrm_vacation_line.
		@return hrm_vacation_line	  */
	public int gethrm_vacation_line_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_vacation_line_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set hrm_vacationline.
		@param hrm_vacationline_ID hrm_vacationline	  */
	public void sethrm_vacationline_ID (int hrm_vacationline_ID)
	{
		if (hrm_vacationline_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_hrm_vacationline_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_hrm_vacationline_ID, Integer.valueOf(hrm_vacationline_ID));
	}

	/** Get hrm_vacationline.
		@return hrm_vacationline	  */
	public int gethrm_vacationline_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_vacationline_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}
}